<?php
namespace app\course\event\listeners\coupon;

use app\course\logic\coupon\admin\CouponUser;
use app\course\model\coupon\admin\Coupon;

/**
 * 卡券被领取事件
 */
class CouponGrant
{
    public static function handle(CouponUser $couponUser)
    {
        app(Coupon::class)->where('id', $couponUser->coupon_id)->inc('receive_count')->update();
    }
}
